/*
 * MetaElement.h
 *
 *  Created on: 2010-6-7
 *      Author: Guobc
 */

#ifndef METAELEMENT_H_
#define METAELEMENT_H_

#include "CommonElement.h"

namespace HA {
class MetaElement: public HA::CommonElement {
public:
	MetaElement();

	/**
	 * Get the set of names handles by this element.
	 * @return The names to be matched that create elements of this type.
	 */
	inline string* getIds() const {
		return mIds;
	}

	/**
	 * Allow creating an instance of this node.
	 * @return A new instance of this node.
	 */
	inline ASTNode* newInstance() const {
		return new MetaElement();
	}

	/**
	 * Set new value of name attribute.
	 * @param metaName The new value of name attribute.
	 */
	inline void setMetaName(const string& metaName) {
		setAttribute("NAME", metaName);
	}

	/**
	 * Get the value of name attribute.
	 * @return The value of name attribute.
	 */
	inline string getMetaName() {
		return getAttribute("NAME");
	}

	/**
	 * Set new value of content attribute.
	 * @param content The new value of name attribute.
	 */
	inline void setMetaContent(const string& content) {
		setAttribute("CONTENT", content);
	}

	/**
	 * Get the value of content attribute.
	 * @return The value of content attribute.
	 */
	inline string getMetaContent() {
		return getAttribute("CONTENT");
	}

	/**
	 * Set new value of http-equiv attribute.
	 * @param httpEqiv The new value of http-equiv attribute.
	 */
	inline void setMetaHttpEquiv(const string& httpEquiv) {
		setAttribute("HTTP-EQUIV", httpEquiv);
	}

	/**
	 * Get the value of http-equiv attribute.
	 * @return The value of htttp-equiv attribute.
	 */
	inline string getMetaHttpEquiv() {
		return getAttribute("HTTP-EQUIV");
	}

private:
	static string mIds[];
};
}
#endif /* METAELEMENT_H_ */
